package app.mvp.utils;

/**
 * Created by 刘智强 on 2017/4/7.
 */

public class OnClickUtil {
    /**
     * 两次点击的间隔时间
     */
    private static final int QUIT_INTERVAL = 2000;

    /**
     * 防止快速点击
     */

    private static long lastClick = 0;

    public static boolean fastClick() {
        if (System.currentTimeMillis() - lastClick <= OnClickUtil.QUIT_INTERVAL) {

            return false;
        }
        lastClick = System.currentTimeMillis();
        return true;
    }
}
